import Vue from 'vue'
import Vuex from 'vuex'
import createPersiste from '@/utils/vue-savedata.js'
import getters from './getters'
import common from './modules/common'
import user from './modules/user'
import music from './modules/music'

Vue.use(Vuex)

const persiste = createPersiste({
  ciphertext: false, // 加密存本地, 默认为false
  saveName: "musicStorage",
  mode: "SS",
  // SS: {
  //   module:common,
  //   storePath: 'common'
  // }
})

export default new Vuex.Store({
  getters,
  plugins: [persiste],
  modules: {
    common,
    user,
    music
  }
})
